//
//  GPUpgradeView.m
//  GoldPig
//
//  Created by 虎爷 on 2020/1/6.
//  Copyright © 2020 虎爷. All rights reserved.
//

#import "GPUpgradeView.h"
@import AudioToolbox;
@interface GPUpgradeView ()
@property (assign, nonatomic) SystemSoundID foldSound;
@end
@implementation GPUpgradeView

+ (instancetype)initGPUpgradeView{
    return NSbunleloadNibName(@"GPUpgradeView");
}
- (void)awakeFromNib {
    [super awakeFromNib];

    [self configureSounds];
}
- (void)configureSounds
{
    // Configure bloom sound
    //
    NSString *foldSoundPath = [[NSBundle mainBundle]pathForResource:@"fold" ofType:@"caf"];
    NSURL *foldSoundURL = [NSURL fileURLWithPath:foldSoundPath];
    AudioServicesCreateSystemSoundID((__bridge CFURLRef)foldSoundURL, &_foldSound);
}
- (IBAction)closeClick:(id)sender {
    AudioServicesPlaySystemSound(self.foldSound);
    [self setHidden:YES];
}
@end
